﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace XRoute.DataExchange
{
    [DataContract(Name = "Node", Namespace = Contracts.Namespace)]
    public class NodeContract
    {
        ///////////////////////////////////////////////////////////////////////

        [DataMember(Name = "Position")]
        readonly NodePositionContract _position;

        [DataMember(Name = "Weight")]
        readonly int _weight;


        ///////////////////////////////////////////////////////////////////////

        public NodeContract(int x, int y, int weight)
        {
            _position = new NodePositionContract(x, y);
            _weight = weight;
        }

        public NodePositionContract Position
        {
            get { return _position; }
        }

        public int Weight
        {
            get { return _weight; }
        }
    }
}
